import { Transform } from 'class-transformer';
import { IsNotEmpty, IsNumber, IsOptional } from 'class-validator';
export class ListUserDto {
  @IsNotEmpty()
  @IsNumber({}, { message: 'limit为数字类型' })
  @Transform(({ value }) => +value)
  limit: number;

  @IsNumber({}, { message: 'page为数字类型' })
  @IsNotEmpty()
  @Transform(({ value }) => +value)
  page: number;

  @IsOptional()
  username?: string;

  @IsOptional()
  nickname?: string;

  @IsOptional()
  email?: string;
}
